import {createSlice} from '@reduxjs/toolkit'

const inspectionResult = createSlice({
  name:'inspectionResult',
  initialState: {
      json: sessionStorage.getItem('json')
  },
  reducers: {
      setJson(state,action) {
          state.json = action.payload
      }
  }
})

export default  inspectionResult.reducer //是注册用
export const {setJson} = inspectionResult.actions //是函数使用